package com.xf.springbean;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class SpringUtil {
	public static Object bean(String beanNanme) {
		ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");

		return ctx.getBean(beanNanme);
	}
	
}
